home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Camelot
/
Camelot 098 (1990-12)(Swedish User Group of Amiga)(SE)(PD)[WB].zip
/
Camelot 098 (1990-12)(Swedish User Group of Amiga)(SE)(PD)[WB].adf
/
XLisp-Stat
/
Functions
/
rockplot.lsp
< prev
next >
Wrap
Text File
|
1990-10-11
|
828b
|
21 lines
; book pp.316-317
(require "functions/pressbutton.lsp")
(defmeth spin-proto :rock-plot (&optional (a .15))
(let* ((angle (send self :angle))
(k (round (/ a angle))))
(dotimes (i k) (send self :rotate-2 0 2 angle))
(dotimes (i (* 2 k)) (send self :rotate-2 0 2 (- angle)))
(dotimes (i k) (send self :rotate-2 0 2 angle))))
(defproto spin-rock-control-proto () () button-overlay-proto)
(send spin-rock-control-proto :title "Rock Plot")
(defmeth spin-rock-control-proto :do-action (first)
(send (send self :graph) :rock-plot))
(defmeth spin-rock-control-proto :resize ()
(let* ((graph (send self :graph))
(size (send self :size))
(width (send graph :canvas-width))
(height (send graph :canvas-height)))
(send self :location (- (list width (+ 0 height)) size))))